<template>
  <div class='news-detail'>
    <!--news-detail-->
        <h1 class="title">{{title}}</h1>
        <div class="nde-title"><span >{{user}}</span>   <span >{{createTime}}</span></div>
        <div>{{content}}</div>
  </div>
</template>
<script>
export default {
  components: {},
  name: "",
  data() {
    return {
        title:'',
        user:'',
        createTime:'createTime ',
        content:''
    };
  },
  methods: {

      init(id){
          _g.apiPost('protalHome/informationInfo.do',{id:id}).then(res=>{
              if(res.status===0){
                  let data = res.data
                  this.$set(this,'title',data.title)
                  this.$set(this,'user',data.userName)
                  this.$set(this,'createTime',data.createTime)
                  this.$set(this,'content',data.content)
              }else{
                  _g.toMessage(res)
              }
          })
      }
  },
  created() {
      let id = this.$router.history.current.query.id
      this.init(id);
  }
};
</script>
<style lang="scss" scoped>
.news-detail {
  width: 1200px;
  margin: 30px auto;
    .title{
        text-align: center;
    }
    .nde-title{
        text-align: center;
        weight:100%;
    }


}
</style>